package com.application.spider.entities.regex;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class ItemRegex implements Serializable {

	private static final long serialVersionUID = -2620958734009233652L;

	private String				regexData;
	private String				regexItem;
	private Integer				groupoId;
	private Boolean				isStaticValue;
	private String				staticValue;
	private Boolean				enabled;
	
	private Boolean				independent;
	private String				url;
	private String				page;
	private String				regexPage;
	private Integer				groupoIdPage;

	private Boolean					conditional;
	private Map<String, String>		conditioanlMap;
	public ItemRegex() {
		enabled=Boolean.TRUE;
		regexData = "";
		regexItem = "";
		groupoId=1;
		isStaticValue=Boolean.FALSE;
		staticValue="";
		
		independent=Boolean.FALSE;
		url="";
		page = "/";
		regexPage = "";
		groupoIdPage = 1;
		
		
		conditional = Boolean.FALSE;
		conditioanlMap = new HashMap<String, String>();
	}

	public String getPage() {
		return page;
	}
	public void setPage(String page) {
		this.page = page;
	}
	public Integer getGroupoId() {
		return groupoId;
	}
	public void setGroupoId(Integer groupoId) {
		this.groupoId = groupoId;
	}
	public String getRegexData() {
		return regexData;
	}

	public void setRegexData(String regexData) {
		this.regexData = regexData;
	}

	public String getRegexItem() {
		return regexItem;
	}

	public void setRegexItem(String regexItem) {
		this.regexItem = regexItem;
	}
	
	public Boolean getIsStaticValue() {
		return isStaticValue;
	}

	public void setIsStaticValue(Boolean isStaticValue) {
		this.isStaticValue = isStaticValue;
	}

	public String getStaticValue() {
		return staticValue;
	}

	public void setStaticValue(String staticValue) {
		this.staticValue = staticValue;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public Boolean getIndependent() {
		return independent;
	}

	public Boolean isIndependent() {
		return independent;
	}
	public void setIndependent(Boolean independent) {
		this.independent = independent;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	
	public String getRegexPage() {
		return regexPage;
	}

	public void setRegexPage(String regexPage) {
		this.regexPage = regexPage;
	}

	public Integer getGroupoIdPage() {
		return groupoIdPage;
	}

	public void setGroupoIdPage(Integer groupoIdPage) {
		this.groupoIdPage = groupoIdPage;
	}

	public Boolean getConditional() {
		return conditional;
	}
	public Boolean isConditional() {
		return conditional;
	}

	public void setConditional(Boolean conditional) {
		this.conditional = conditional;
	}

	public Map<String, String> getConditioanlMap() {
		return conditioanlMap;
	}

	public void setConditioanlMap(Map<String, String> conditioanlMap) {
		this.conditioanlMap = conditioanlMap;
	}
	public void addConditionalItem(String key,String value){
		conditioanlMap.put(key, value);
	}

	public Collection<String> getConditioanlMapKeys() {
		return conditioanlMap.keySet();
	}

	public String getConditioanlMapValue(String key) {
		return conditioanlMap.get(key);
	}
	
}
